//
//  SQShopRulesViewController.m
//  pai
//
//  Created by pro on 14-11-21.
//  Copyright (c) 2014年 linjunjing. All rights reserved.
//

#import "SQShopRulesViewController.h"

@interface SQShopRulesViewController ()

@end

@implementation SQShopRulesViewController

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        // Custom initialization
    }
    return self;
}

- (void)viewDidLoad
{
    [super viewDidLoad];
    
    [self setTitle:@"兑换规则"];
    
    [self getrules];
}

-(void)getrules
{
    [self showrules];
}

-(void)showrules
{
    NSString* str =@"      用户对商品进行兑换时，可以使用账户的积分余额。\n\n      根据商品的积分标价，进行兑换。";
    
    UILabel* label = [[UILabel alloc]initWithFrame:CGRectMake(0, 0, 0, 0)];
    [label setNumberOfLines:0];
    [label setFont:[UIFont systemFontOfSize:16]];
    [label setTextColor:[UIColor blackColor]];
    [label setText:str];
    CGSize size = [label.text sizeWithFont:[UIFont systemFontOfSize:16] constrainedToSize:CGSizeMake(280, 3000)];
    [label setFrame:CGRectMake(20, self.MyNavigationBar.frame.origin.y+self.MyNavigationBar.frame.size.height+20, size.width, size.height)];
    
    [self.view addSubview:label];
}

- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
